//Program: The program that runs the gorbatras converter

#ifndef GORBATRAS_PROGRAM
	#define GORBATRAS_PROGRAM

#if defined (_UNICODE)
	#define tpath boost::filesystem::wpath	
#else
	#define tpath boost::filesystem::path	
#endif


#if defined(_DEBUG)	
	//If in test mode or not!
	#define _TESTING

	#if defined (_UNICODE)
	//Used for easy debugging when developing
		#define Cout std::wcout	
	#else
		#define Cout std::cout
	#endif
#endif

class Program
{
	public:
		enum Status
		{
			Success = 0,
			//If the program failed
			Program_Failed = 1,
			//If the converter failed something
			Converter_Failed = 2
		};

		Program();
		
		const int Run(const int a_argc,_TCHAR* a_argv[] );
	private:
		bool m_validWorkingDirectory;
		_TCHAR* m_inputName;
		_TCHAR* m_outputName;

		void ReadArguments(const int a_argc, _TCHAR* a_argv[], const _TCHAR* a_processFile ,_TCHAR* a_workingDirectory );
		const bool TryToChangeWorkingDirectory( const _TCHAR* a_processArgument, _TCHAR* a_workingDirectoryStr );
		void ClearLog();
		void LogMessage( const wchar_t* a_msg, const bool a_newline = true);		
		void GetProcessDirectory(const _TCHAR* a_processArgument, _TCHAR* a_workingDirectoryStr,const int a_strLength );
};

#endif